package com.practice.xw.service.impl;

import com.practice.xw.service.DemoService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;

/**
 * @author ：xiongwei
 * @date ：Created in 2021/7/20 23:39
 */
@Slf4j
@Service
public class DemoServiceImpl implements DemoService {

    @Override
    public String getMessage(Integer integer) {
        log.info("打印值：{}", integer);
        return integer.toString();
    }

    @Override
    public String getLongMessage(Long integer) throws Exception {
        if (integer == -1){
            throw new Exception("出现异常");
        }
        log.info("打印值：{}", integer);
        return integer.toString();
    }

}
